<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{
      width: 300px;
      height: 70px;
      background-color: rgba(0, 0 ,0,0.3);
      position: relative;
      overflow: hidden;
      border: black solid 0;
    }
   div>input{
     width: 275px;
     height: 30px;
     margin-top:10px;
     margin-left: 10px;
     border: none;
   }
   div>img{
     position:absolute;
     top: 12px;
     right: 30px;
   }
   div>p{
     margin-left: 10px;
     margin-top: 0;
     font-size: 12px;
     color: red;
   }
  </style>
</head>
<body>
<div>
  <input type="text" placeholder="请输入用户名">
  <img src="http://doc.canglaoshi.org/tstore_v1/images/login/yhm.png" alt="">
  <p>用户名不能为空</p>
</div>
</body>
</html>